package edu.infomatik.tundra.data;

import java.util.Date;

import org.hibernate.HibernateException;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class DataUtils {
	private static final SessionFactory sessionFactory;
	static{
		try{
			sessionFactory = new Configuration().configure().buildSessionFactory();
		}catch(HibernateException he){
			System.err.printf("Initial Data Session failed."+he);
			throw new ExceptionInInitializerError(he);
		}
	}
	public static SessionFactory getSessionFactory(){
		return sessionFactory;
	}
	public static Date getNow(){
		return new Date();
	}
}
